package cn.hchaojie.camp.day01;

public class DemoSwitch {
	public static void main(String[] args) {
		int day = 6;
		
//		if (day == 1) {
//			System.out.println("星期一");
//		} else if (day == 2) {
//			System.out.println("星期二");
//		} 
		
		switch (day) {
		case 1:
			System.out.println("星期一");
			break;
			
		case 2:
			System.out.println("星期二");
			break;

		default:
			System.out.println("错误的天数！");
			break;
		
		}
		
		// 工作日判断
		if (day == 1 || day == 2 || day == 3 || day == 4 || day == 5) {
			System.out.println("工作日！");
		} else if (day == 6 || day == 7) {
			System.out.println("双休");
		} else {
			System.out.println("错误的天数！");
		}
		
		switch (day) {
		// 几种case作同样的处理，写到一起
		case 1:
		case 2:
		case 3:
		case 4:
		case 5:
			System.out.println("工作日");
			break;
			
		case 6:
		case 7:
			System.out.println("双休");
			break;

		default:
			System.out.println("错误的天数！");
			break;
		}
	}
}
